package com.yc.api;

import com.yc.api.config.FeignConfig;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpSession;
import java.util.List;
import java.util.Map;

/**
 * @ClassName CartApi
 * @since: 2023/8/23 19:45
 * @auth: kirito
 * @description:
 **/
@FeignClient(value = "freshgood-cart",path = "cart",configuration = FeignConfig.class)
public interface CartApi {
    @RequestMapping(value = "findCart",method = RequestMethod.GET)
    public List<Map<String, Object>> findByMno(@RequestParam Integer mno);

    @RequestMapping(value = "addCart",method = RequestMethod.GET)
    public String addCart(@RequestParam Integer gno, @RequestParam Integer num, HttpSession session);

    @RequestMapping(value = "updateCart",method = RequestMethod.GET)
    public int updateCart(@RequestParam String cno, @RequestParam Integer num, HttpSession session);
//
    @RequestMapping(value = "delCart",method = RequestMethod.GET)
    public int delCart(@RequestParam String cno, HttpSession session);


}
